import time

from selenium.webdriver.common.by import By

from base.page_base import PageBase


class PageAddShop(PageBase):

    click_comm_04=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.netease.yanxuan:id/img_goods"])[1]')
    click_join_tro_05=(By.XPATH,'//android.widget.TextView[@resource-id="com.netease.yanxuan:id/button"]')
    click_join_tro_00=(By.XPATH,'//android.widget.TextView[@resource-id="com.netease.yanxuan:id/button"]')
    get_tocat_06=(By.XPATH,'//android.widget.Toast')
    click_back_01 = (By.ID, 'com.netease.yanxuan:id/nav_left_text')
    click_back_02 = (By.ID, 'com.netease.yanxuan:id/search_bar_return')

    def click_add(self):

        self.base_click(self.click_comm_04)
        self.base_click(self.click_join_tro_05)
        time.sleep(1)
        self.base_click(self.click_join_tro_05)


    def add_shop(self):

        self.click_add()




    def get_text(self):
        self.base_get_toast(self.get_tocat_06)


    def click_back(self):
        self.base_click(self.click_back_01)
        self.base_click(self.click_back_02)
        self.base_click(self.click_back_02)